{template '_header'}
<div class="page-heading"> 
	<span class='pull-right'>
		{ifp 'merch.group.add'}
			<a class="btn btn-primary btn-sm" href="{php echo webUrl('merch/group/add')}">添加新商户分组</a>
		{/if}
		<a class="btn btn-default  btn-sm" href="{php echo webUrl('merch/group')}">返回列表</a>
	</span>
	<h2>{if !empty($item['id'])}编辑{else}添加{/if}商户分组 <small>{if !empty($item['id'])}修改【{$item['groupname']}】{/if}</small></h2>
</div>

<form {ife 'merch.group' $item}action="" method="post"{/if} class="form-horizontal form-validate" enctype="multipart/form-data">
<input type="hidden" name="id" value="{$item['id']}" />
 <div class="form-group">
	<label class="col-sm-2 control-label must">分组名称</label>
	<div class="col-sm-9 col-xs-12 ">
		{ife 'merch.group' $item}
		<input type="text" id='groupname' name="groupname" class="form-control" value="{$item['groupname']}" data-rule-required="true" />
		{else}
		<div class='form-control-static'>{$item['groupname']}</div>
		{/if}
	</div>
</div>

<div class="form-group-title">权限</div>

<div class="form-group">
	<label class="col-sm-2 control-label">商品免审核</label>
	<div class="col-sm-9 col-xs-12">
		{ife 'merch.group' $item}
		<label class='radio-inline'>
			<input type='radio' name='goodschecked' value=1' {if $item['goodschecked']==1}checked{/if} /> 是
		</label>
		<label class='radio-inline'>
			<input type='radio' name='goodschecked' value=0' {if $item['goodschecked']==0}checked{/if} /> 否
		</label>
		<span class="help-block">商户添加的商品是否免审核</span>
		{else}
		<div class='form-control-static'>{if empty($item['goodschecked'])}否{else}是{/if}</div>
		{/if}
	</div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">设置商品佣金</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'merch.group' $item}
        <label class='radio-inline'>
            <input type='radio' name='commissionchecked' value=1' {if $item['commissionchecked']==1}checked{/if} /> 是
        </label>
        <label class='radio-inline'>
            <input type='radio' name='commissionchecked' value=0' {if $item['commissionchecked']==0}checked{/if} /> 否
        </label>
        <span class="help-block">商户添加的商品是否可以设置商品佣金</span>
        {else}
        <div class='form-control-static'>{if empty($item['commissionchecked'])}否{else}是{/if}</div>
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">修改订单价格</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'merch.group' $item}
        <label class='radio-inline'>
            <input type='radio' name='changepricechecked' value=1' {if $item['changepricechecked']==1}checked{/if} /> 是
        </label>
        <label class='radio-inline'>
            <input type='radio' name='changepricechecked' value=0' {if $item['changepricechecked']==0}checked{/if} /> 否
        </label>
        <span class="help-block">商户是否可以修改订单价格</span>
        {else}
        <div class='form-control-static'>{if empty($item['changepricechecked'])}否{else}是{/if}</div>
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">订单确认收货</label>
    <div class="col-sm-9 col-xs-12">
        {ife 'merch.group' $item}
        <label class='radio-inline'>
            <input type='radio' name='finishchecked' value=1' {if $item['finishchecked']==1}checked{/if} /> 是
        </label>
        <label class='radio-inline'>
            <input type='radio' name='finishchecked' value=0' {if $item['finishchecked']==0}checked{/if} /> 否
        </label>
        <span class="help-block">商户是否可以在后台点击确认收货</span>
        {else}
        <div class='form-control-static'>{if empty($item['finishchecked'])}否{else}是{/if}</div>
        {/if}
    </div>
</div>

<div class="form-group-title">其他</div>

<div class="form-group">
	<label class="col-sm-2 control-label">是否默认分组</label>
	<div class="col-sm-9 col-xs-12">
		{ife 'merch.group' $item}
		<label class='radio-inline'>
			<input type='radio' name='isdefault' value='1' {if $item['isdefault']==1}checked{/if} /> 是
		</label>
		<label class='radio-inline'>
			<input type='radio' name='isdefault' value='0' {if $item['isdefault']==0}checked{/if} /> 否
		</label>
		<span class="help-block">商户入驻后默认的分组</span>
		{else}
		<div class='form-control-static'>{if empty($item['isdefault'])}否{else}是{/if}</div>
		{/if}
	</div>
</div>

<div class="form-group">
	<label class="col-sm-2 control-label">状态</label>
	<div class="col-sm-9 col-xs-12">
		{ife 'merch.group' $item}
		<label class='radio-inline'>
			<input type='radio' name='status' value=1' {if $item['status']==1}checked{/if} /> 启用
		</label>
		<label class='radio-inline'>
			<input type='radio' name='status' value=0' {if $item['status']==0}checked{/if} /> 禁用
		</label>
		{else}
		<div class='form-control-static'>{if empty($item['status'])}禁用{else}启用{/if}</div>
		{/if}
	</div>
</div>

<div class="form-group">
	<label class="col-sm-2 control-label"></label>
	<div class="col-sm-9 col-xs-12">
		{ife 'merch.group' $item}
		<input type="submit" value="提交" class="btn btn-primary"  />
		{/if}
		<input type="button" name="back" onclick='history.back()' {ifp 'merch.group.add|merch.group.edit'}style='margin-left:10px;'{/if} value="返回列表" class="btn btn-default" />
	</div>
</div>

</form>
{template '_footer'}